import fly from '../utils/fly.js'
/**
 * 商品查询
 */
export function getTagsList(params) {
	return fly.get({
		url: '/admin/goods/list',
		needToken: false,
		params:params
	})
}
// export function getGoodsList(params) {
// 	return fly.get({
// 		url: '/goods/search',
// 		needToken: false,
// 		params:params
// 	})
// }
/**
 * 查询商品列表 new
 */
export function getGoodsList(goods_id,params) {
	return fly.get({
		url: '/home/goods/'+goods_id,
		needToken: false,
		params
	})
}
/**
 * 商品详情
 */
export function GetGoodsDetail(goods_id) {
	return fly.get({
		url: '/admin/goods/details/'+goods_id,
		needToken: false,
	})
}
/**
 * 商品规格
 */
export function goodsSku(goods_id) {
	return fly.get({
		url: '/admin/goods/'+goods_id+'/skus',
		needToken: false
	})
}
/**
 * 查询某商品的评论
 */
export function getGoodsCommentList(goods_id,params) {
	return fly.get({
		url: '/members/comments/goods/'+goods_id,
		needToken: true,
		params
	})
}
/**
 * 查询某商品的评论数量
 */
export function GoodsCommentCount(goods_id) {
	return fly.get({
		url: '/members/comments/goods/'+goods_id+'/count',
		needToken: false,
	})
}
/**
 * 查看某个评论
 */
export function getGoodsCommentSingle(params) {
	return fly.get({
		url: '/members/comments/memberComment',
		needToken: false,
		params
	})
}
/**
 * 评分统计
 */
export function GoodsCommentScore(params) {
	return fly.get({
		url: '/members/comments/score',
		needToken: true,
		params
	})
}
